import os
import secrets

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or secrets.token_hex(16)
    UPLOAD_FOLDER = os.path.abspath('uploads')
    ALLOWED_EXTENSIONS = {'zip', 'exe', 'msi', 'bat', 'sh', 'rar', '7z', 'tar', 'gz'}
    SQLALCHEMY_DATABASE_URI = 'sqlite:///file_manager.db'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    MAX_CONTENT_LENGTH = 16 * 1024 * 1024  # 16 MB

class DevelopmentConfig(Config):
    DEBUG = True

class ProductionConfig(Config):
    DEBUG = False

app_config = {
    'development': DevelopmentConfig,
    'production': ProductionConfig,
    'default': DevelopmentConfig
}